home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Atari Compendium
/
The Atari Compendium (Toad Computers) (1994).iso
/
files
/
umich
/
falcon
/
programm.ing
/
asm56.zoo
/
rvb2.a56
< prev
next >
Wrap
Text File
|
1992-11-14
|
20KB
|
416 lines
; filename: RVB2.ASM
;
;
; This code is an optimized version of the reverberation algorithm
; found in file RVB1.ASM. This program makes use of the parallel
; move functionality of the 56001. While this tends to make the
; code less readible, it does increase its speed. This version
; is intended to run on the DSP56000ADSx (Application Development
; System)board rev #2, with memory expansion. The memory should
; be configured figured for 8K p-memory, 16K x-memory, 8K y-memory.
;
; Further gains in algorithm speed could be realized on boards not
; constrained by the ADS memory limitations. For example, due to
; the need for 4 comb filters' worth of storage (each using about
; 3500 samples - which takes 4096 samples each after using the DSM
; statement) to fit into the 16K available for the x memory, we
; must start at address $0000. Thus, we are forced to use all the
; 56000's internal memory for sample storage. Without being forced
; to start sample storage at $0000, the 56000's internal memory could
; be used for coefficient storage, allowing better use of parallel
; x and y moves.
;
; Motorola DSP Group
; Austin, Texas
;
;**************************************************************************
; This program was originally available on the Motorola DSP bulletin board
; and is provided under a DISCLAIMER OF WARRANTY available from Motorola
; DSP Operation, 6501 William Cannon Dr. W Austin, Texas 78735-8598.
;**************************************************************************
;--------------------------------------------------------------------------
; This reverberation program is a variation of the reverberation
; system and structures as described by James Moorer's article entitled
; 'About this Reverberation Business', Computer Music Journal,
; 3(2):13-28, 1979
;
; Structure is:
; .----------.
; .------------. .-----. | All Pass |
; +->| Comb Filter|-->| SUM |-->| Reverb |
; Note: All Comb | | #1 | '-----' | |
; Filters | '------------' ^ ^ ^ '----------'
; Have a 1st | .------------. | | | |
; Order IIR |->| Comb Filter|---+ | | .---V---.
; LPF in their | | #2 | | | | align |
; feedback | '------------' | | | delay |
; loop | .------------. | | '---|---'
; |->| Comb Filter|------+ | |
; | | #3 | | ----- reverb
; | '------------' | \./ gain
; | .------------. | |
; |->| Comb Filter|---------+ |
; | | #4 | |
; | '------------' |
; | V
; .------------. | FIR gain .----------.
; | Early | | |\ | |
;input -->| Reflection |--+---------| >------------>| summer |--- output
; | | FIR | |/ | |
; | '------------' '----------'
; | ^
; | |
; | dry gain |
; | |\ |
; +------------------------------| >----------------+
; |/
;
;.............................................................................
; COMB FILTER SUB STRUCTURE:
; .-------.
; comb i .-----. | long | comb i
; input ------>| sum |---->| delay |-------+---------> output
; '-----' '-------' |
; ^ |
; | V
; | /| .-----.
; +-----< ------------| sum |<--------+
; \| '-----' |
; fdbck i | / \ lpf i gain
; gain V /_____\
; gain .----------. |
; | 1 sample | |
; | delay |-----+
; '----------'
;.............................................................................
; UNIT (ALL PASS) REVERBERATOR STRUCTURE:
; based on Schroeder as outlined in Griesinger: 'Practical Processors and
; Programs for Digital Reverberation', Audio in Digital Times, 7th AES
; conference, Toronto, Ontario, 1989
; (the structure outlined in Moorer is a variation of this)
;
; -g
; |\
; +---------->| >--------------------------+
; | |/ |
; | |
; | V
; unit | .-----. .--------. |\ .-----. unit
; input ------+--->| sum |-->| delay |--+--->| >-->| sum |-----> output
; '-----' '--------' | |/ '-----'
; ^ | 1-g**2
; | g |
; | /| |
; +-----< |---------+
; \|
;
;...........................................................................
;
; one multi-tap fir structure - to handle early reflections
;
; followed by 4 parallel comb (iir) filters (each comb having
; a first order LPF in its feedback loop
;
; followed by an 'allpass' reverberator whose output is then
; delayed so that its first output follows after the last "early
; reflection" output
;
;__________________________________________________________________________
;
opt cex
page 132
;--------------------------------------------------constant declarations
adc equ $ffef ; ADC address
dac equ $ffef ; DAC address
ntap equ 7 ; number of taps
ntapp10 equ ntap+10 ; # taps + 10 for other variables
tapmod equ ntapp10-1 ; number of taps minus 1
dlymx equ 4000 ; length of delay line in samples
cmbdly1 equ 2205 ; COMB FILTER CONSTANTS
cmbdly2 equ 2690 ; delay values (in samples)
cmbdly3 equ 3175
cmbdly4 equ 3440
cmbmod1 equ 3490 ; modulo for comb #1 delay line THESE ARE
cmbmod2 equ 3490 ; " " #2 " " ALSO THE
cmbmod3 equ 3490 ; " " #3 " " MAX DELAYS
cmbmod4 equ 3490 ; " " #4 " " ALLOWED FOR
; CHOSEN DSM
; VALUE
untrvbdly equ 265 ; delay UNIT (or ALLPASS)
unt_g equ 0.7 ; gains (g) REVERBERATOR
neg_g equ -unt_g ; (-g)
one_m_g2 equ (1-unt_g*unt_g) ; " (1-g**2)
cmb_g equ 0.86 ; (OVERALL) COMB FILTER FEEDBACK GAIN
; controls reverb decay time: smaller
; values give quicker decay, larger